Cloud computing underpins modern IT infrastructure by delivering scalable, on-demand resource provisioning, yet controlling cloud expenditure remains a pressing challenge. Dynamic pricing structures, unpredictable workloads, and billing pipelines that lack real-time visibility create conditions in which unauthorized consumption and anomalous usage spikes routinely escape timely detection. This paper presents CloudPay, a blockchain-integrated cloud storage billing system that unifies unsupervised machine learning with smart contract execution to deliver verifiable, fine-grained, and fraud-resistant cost governance. The system converts user storage activity into time-series representations and applies the Isolation Forest algorithm to detect abnormal consumption spikes without any labelled training data. Flagged events are routed through an owner confirmation protocol that validates suspicious uploads before billing proceeds, preventing unauthorized charges from entering the settlement pipeline. Smart contracts autonomously compute GB-time-based charges, execute tokenized payments, and anchor every transaction to an immutable SHA-256 blockchain ledger. Experimental results confirm that the system achieves 94.4% anomaly detection accuracy, 99.7% billing precision, and an 18.4% reduction in overall cloud expenditure relative to static allocation baselines. These results demonstrate that integrating unsupervised anomaly detection with cryptographically enforced billing logic is a viable path toward tamper-evident, real-time cost governance in multi-tenant cloud environments.
Introduction
Cloud computing has greatly improved how organizations manage IT resources, but it has also created challenges in controlling costs due to over-provisioning, unpredictable usage spikes, and limited real-time billing accuracy. To address these issues, this work proposes a system called CloudPay, which combines machine learning, blockchain, and smart contracts to enable more accurate and transparent cloud billing.
The system uses Isolation Forest to detect abnormal storage usage patterns in real time. Instead of directly charging users for flagged anomalies, CloudPay introduces a human-in-the-loop confirmation step, where data owners can approve or reject unusual usage before billing. This helps prevent errors and unauthorized charges.
Once confirmed, usage data is processed through a smart contract-based billing system that automatically calculates costs using a GB-time pricing model and records all transactions on a blockchain ledger for transparency and immutability.
The architecture includes modules for cloud monitoring, user dashboards, anomaly detection, owner confirmation, and blockchain billing integration. Machine learning is used for detecting anomalies, while blockchain ensures secure and tamper-proof financial records.
Related work shows that while existing research has separately explored cloud cost prediction, anomaly detection, and blockchain billing, there is no unified system combining all three in real time. CloudPay addresses this gap by integrating these components into a single platform.
Conclusion
This paper has presented CloudPay, an end-to-end cloud storage billing platform that couples Isolation Forest anomaly detection with smart contract settlement and blockchain-anchored transaction recording. The system directly resolves three structural weaknesses in conventional cloud billing: metering inaccuracies arising from undetected anomalous uploads, the mutability and opacity of traditional invoice records, and the lack of real-time owner oversight before billing actions are taken.
Evaluation over a 90-day simulated dataset confirmed the effectiveness of each component: the Isolation Forest detector attained a 94.4% detection rate and a 3.8% false positive rate; smart contract billing raised billing precision from 87.3% to 99.7% while cutting dispute incidents by approximately 98%; and the owner confirmation protocol held unauthorized billing events below 0.3%, contributing to an overall expenditure reduction of 18.4% versus a static allocation baseline.
Future work will focus on three directions. First, integrating CloudPay with real cloud provider APIs (AWS, Azure, GCP) to enable production-scale evaluation on live billing logs with independently determined anomaly rates. Second, extending the anomaly detection pipeline to include multi-variate resource features using the BiGRU and Temporal Fusion Transformer architectures demonstrated by Nawrocki and Smendowski [12] to achieve long-term proactive resource reservation. Third, deploying the blockchain component on a distributed ledger framework to evaluate consensus-layer performance under realistic transaction loads.
References
[1] P. Mell and T. Grance, \"The NIST Definition of Cloud Computing,\" National Institute of Standards and Technology, NIST SP 800-145, Sep. 2011.
[2] P. Osypanka and P. Nawrocki, \"Resource Usage Cost Optimization in Cloud Computing Using Machine Learning,\" IEEE Trans. Cloud Comput., vol. 10, no. 3, pp. 2079–2089, 2022.
[3] E. F. Agyemang, \"Anomaly detection using unsupervised machine learning algorithms: A simulation study,\" Sci. Afr., 2024, Article e02386.
[4] W. Chua et al., \"Web Traffic Anomaly Detection Using Isolation Forest,\" Informatics, vol. 11, no. 4, p. 83, Nov. 2024.
[5] W. Zheng, \"Cost-benefit modeling of smart contracts applied to the accounting and auditing field,\" Appl. Math. Nonlinear Sci., vol. 9, no. 1, 2024.
[6] A. Q. Khan, M. Matskin, R. Prodan, C. Bussler, and D. Roman, \"Cost modelling and optimisation for cloud: a graph-based approach,\" J. Cloud Comput., vol. 13, art. no. 147, Sep. 2024.
[7] S. Gupta, A. D. Dinesh, and T. A. Gonsalves, \"Resource Usage Prediction of Cloud Workloads Using Deep Bidirectional Long Short Term Memory Networks,\" in Proc. IEEE Int. Conf. Advanced Networks and Telecommunications Systems (ANTS), Bhubaneswar, India, 2017, pp. 1–6.
[8] N. T. Hieu, M. D. Francesco, and A. Ylä-Jääski, \"Virtual Machine Consolidation with Multiple Usage Prediction for Energy-Efficient Cloud Data Centers,\" IEEE Trans. Serv. Comput., vol. 13, no. 1, pp. 186–199, Jan. 2020.
[9] R. N. Calheiros, E. Masoumi, R. Ranjan, and R. Buyya, \"Workload Prediction Using ARIMA Model and Its Impact on Cloud Applications’ QoS,\" IEEE Trans. Cloud Comput., vol. 3, no. 4, pp. 449–458, Dec. 2015.
[10] S. Gupta, A. D. Dinesh, and T. A. Gonsalves, \"Online Sparse BLSTM Models for Resource Usage Prediction in Cloud Datacentres,\" IEEE Trans. Netw. Serv. Manage., vol. 17, no. 4, pp. 2335–2349, Dec. 2020.
[11] F. Rossi, V. Cardellini, and F. L. Presti, \"Horizontal and Vertical Scaling of Container-Based Applications Using Reinforcement Learning,\" in Proc. IEEE 12th Int. Conf. Cloud Computing (CLOUD), Milan, Italy, Jul. 2019, pp. 329–338.
[12] P. Nawrocki and M. Smendowski, \"Optimization of the Use of Cloud Computing Resources Using Exploratory Data Analysis and Machine Learning,\" JAISCR, vol. 14, no. 4, pp. 287–308, 2024.
[13] P. Nawrocki, P. Osypanka, and B. Posluszny, \"Data-Driven Adaptive Prediction of Cloud Resource Usage,\" J. Grid Comput., vol. 21, art. no. 6, Jan. 2023.
[14] S. Zhang, T. Wu, M. Pan, C. Zhang, and Y. Yu, \"A-SARSA: A Predictive Container Auto-Scaling Algorithm Based on Reinforcement Learning,\" in Proc. IEEE Int. Conf. Web Services (ICWS), Beijing, China, 2020, pp. 489–497.
[15] P. Nawrocki and M. Smendowski, \"FinOps-Driven Optimization of Cloud Resource Usage for High-Performance Computing Using Machine Learning,\" J. Comput. Sci., vol. 79, art. no. 102292, 2024.
[16] F. T. Liu, K. M. Ting, and Z.-H. Zhou, \"Isolation Forest,\" in Proc. 8th IEEE Int. Conf. Data Mining (ICDM), Pisa, Italy, Dec. 2008, pp. 413–422.
[17] P. Nawrocki, M. Grzywacz, and B. Sniezynski, \"Adaptive Resource Planning for Cloud-Based Services Using Machine Learning,\" J. Parallel Distrib. Comput., vol. 152, pp. 88–97, Jun. 2021.